package io.noties.markwon.base.image.load

import android.graphics.drawable.Drawable
import io.noties.markwon.base.image.AsyncDrawable

interface AsyncDrawableLoader {
    /**
     * @since 4.0.0
     */
     fun load(drawable: AsyncDrawable)

    /**
     * @since 4.0.0
     */
     fun cancel(drawable: AsyncDrawable)

     fun placeholder(): Drawable?

    companion object {
        /**
         * @since 3.0.0
         */
        fun noOp(): AsyncDrawableLoader {
            return AsyncDrawableLoaderNoOp()
        }
    }
}